<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    {if $factory_id==0 }
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factory_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_id" data-rule="" data-source="factory/index" class="form-control selectpage" name="row[factory_id]" type="text" value="">
        </div>
        <div class="c-help"><a href="{:url('factory/add')}" class="btn-dialog">添加厂区</a></div>
    </div>
    {/if}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_id" data-rule="required" data-source="group/index" {if $factory_id>0} data-params='{"custom[factory_id]": "{$factory_id}" }' {/if} class="form-control selectpage" name="row[group_id]" type="text" value="">
        </div>
        <div class="c-help"><a href="{:url('group/add')}" class="btn-dialog">添加组别</a></div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" placeholder="批次日期格式如: 20220101" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Last_batch_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-last_batch_id" data-source="batch/index" class="form-control selectpage" name="row[last_batch_id]" type="text" value="" placeholder="父级" >
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pinxi_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pinxi_id" data-rule="" data-source="pinxi/index" data-field="name" data-format-item="{daici} - {name}" class="form-control selectpage" name="row[pinxi_id]" type="text" value="" placeholder="无" >
        </div>
        <div class="c-help"><a href="{:url('pinxi/add')}" class="btn-dialog">添加品系</a></div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('负责人/操作员')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            @demo       -->
            <input id="c-admin_ids" data-source="auth/admin/index" data-field="nickname" data-format-item="{nickname}( {username} )" data-multiple="true" class="form-control selectpage" name="row[admin_ids]" type="text" value="" placeholder="" >

        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

            <div class="c-help">( 使用中:手机端可见, 使用结束:结束后不建议删除, 隐藏/删除:(待定) )</div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
